-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added ability to inject custom drivers #1105
Conversation
if (false === mb_strpos($path, '..'.DIRECTORY_SEPARATOR) && | ||
false === mb_strpos($path, DIRECTORY_SEPARATOR.'..') && | ||
false !== file_exists($absolute = $root.DIRECTORY_SEPARATOR.$path) | ||
if (false === mb_strpos($path, '..'.\DIRECTORY_SEPARATOR) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the backslashes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is global constant and php-cs doesn't like it without backslash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm maybe better to disable the php-cs rule? I have never added blackslashes to such global constants and don't really see the point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was fixed in 1107.
will remove backslashes.
Binary/Locator/FileSystemLocator.php
Outdated
@@ -60,7 +60,7 @@ public function locate(string $path): string | |||
*/ | |||
protected function generateAbsolutePath(string $root, string $path): ?string | |||
{ | |||
if (false !== $absolute = realpath($root.DIRECTORY_SEPARATOR.$path)) { | |||
if (false !== $absolute = realpath($root.\DIRECTORY_SEPARATOR.$path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the backslashes here?
@@ -127,7 +127,7 @@ private function getBundleResourcePaths(ContainerBuilder $container) | |||
} | |||
|
|||
return array_map(function ($path) { | |||
return $path.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'public'; | |||
return $path.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'public'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the backslashes here?
Tests/AbstractTest.php
Outdated
@@ -50,8 +50,8 @@ | |||
|
|||
protected function setUp() | |||
{ | |||
$this->fixturesPath = realpath(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'); | |||
$this->temporaryPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'liip_imagine_test'; | |||
$this->fixturesPath = realpath(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the backslashes here?
maybe we should have a 2.1 branch for this? or should we actually start using master again for future minor/major new versions? |
@lsmith77 we started to use |
this PR makes possible to declare and inject custom drivers for the bundle.
validation on strict match for 'gd', 'imagick', 'gmagick' has been removed